import { onMounted, onBeforeUnmount } from "vue";
export default function (resize) {
    /* 浏览器监听 resize 事件 */
    onMounted(async () => {
         resize()
          // 为浏览器绑定事件
          window.addEventListener("resize", resize, false);
      });
    /* 销毁时触发 */
    onBeforeUnmount(() => {
        window.removeEventListener("resize", resize);
    }); 
}